<script>
export default {
  name: "GrandSon",
  inject: ['color','userInfo'],
}
</script>

<template>
  <div class="GrandSon">
    我是GrandSon组件
    <p>color:{{color}}</p>
    <p>userInfo：{{userInfo.name}}-{{userInfo.age}}</p>
  </div>
</template>

<style scoped>
.GrandSon {
  height: 100px;
  width: 150px;
  border-radius: 10px; /* 设置圆角 */
  padding: 10px; /* 内边距为10px */
  margin: 5px;
  border: 1px solid #eeeeee; /* 1px的边框 */
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* 添加阴影 */
}
</style>
